package agendatelefonica.agenda;


import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.content.Intent;




public class Activity0_menu_ppal extends Activity {

	
	
	   public void onCreate(Bundle savedInstanceState) {
		
	      super.onCreate(savedInstanceState);
	      setContentView(R.layout.menu_ppal);
	      
	    //iniciar los objetos
	      Button btnNvaInsp = (Button) findViewById(R.id.btnNvaInsp);
	      Button btnBuscarInsp = (Button) findViewById(R.id.btnBuscarInsp);
	      Button btnCrear = (Button) findViewById(R.id.btnGenSQL);
	      Button btnSalir = (Button) findViewById(R.id.btnSalir);
	      
	      btnNvaInsp.setOnClickListener(new OnClickListener() {
	            public void onClick(View v) {
	               Intent intent = new Intent(Activity0_menu_ppal.this, mainActivity.class);
	               startActivity(intent);
	            }
	         });
	
	      btnBuscarInsp.setOnClickListener(new OnClickListener() {
	            public void onClick(View v) {
	               Intent intent = new Intent(Activity0_menu_ppal.this, Activity0_inspeccion.class);
	               startActivity(intent);
	            }
	         });
	
	      
	      btnCrear.setOnClickListener(new OnClickListener() {
	            public void onClick(View v) {
	               Intent intent = new Intent(Activity0_menu_ppal.this, Activity0_menu_ppal.class);
	               startActivity(intent);
	            }
	         });
	
	      
	      // Evento onclick del botón, cuando se pulse, cerramos la actividad
	      btnSalir.setOnClickListener(new OnClickListener() {
	         public void onClick(View v) {
	            finish();
	         }
	      });
	   }
	   
	
		
}
